<include file="Public:header" />
<form name="myform" id="myform" method="post" action="__ACTION__" >
	<input type="hidden" name="data[id]" value="{$info.id}" />
  <fieldset>
    <legend>基本信息</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th>电话分组：</th>
          <td><input name="data[name]" id="name" class="input-text" type="text" size="20" value="{$info.name}">
            <span class="onShow"></span></td>
        </tr>
        <tr>
          <th>排序：</th>
          <td><input name="sort" id="data[sort]" class="input-text" type="text" size="10" value="{$info.sort}" style="width:50px; text-align:center;">
            注：数值越小越靠前</td>
        </tr>
        <tr class="last">
          <th>备注：</th>
          <td colspan="3"><textarea name="data[remark]" id="remark" class="input-textarea" cols="75" rows="4">{$info.remark}</textarea></td>
        </tr>
      </tbody>
    </table>
  </fieldset>
  <input type="submit" value="提交" class="dialog"  id="dosubmit">
</form>
</body>
</html>

<script type="text/javascript">
$(function(){
	$('#myform').submit(function(){  
       // 加入需要的操作代码  
       $('#myform').ajaxSubmit({  
           beforeSubmit:  checkForm,  
           success:       complete  
       });  
       return false;  
	}); 

	function checkForm(){
		
		if($('#name').val().length < 2){
			$('#name').focus();
			checkInfo('name','分组名称不得少于2个字符');
			return false;
		}else{
			return true;	
		}
		
	}
	var origin = $.artDialog.open.origin;
    function complete(data){
		if(data.status==1){
			art.dialog({id:'TNCICC',content: data.info,time: 2,icon:'succeed'});
			setTimeout(function(){origin.location.reload();},1000);
		}else{
			art.dialog({id:'TNCICC',content: data.info,time: 2,icon:'warning'});
		}
		closeWin(1500);
    }
})
</script>
